<?php
// +-------------------------------------------------------------------
// | 
// +-------------------------------------------------------------------
// | Copyright (c) 2009-2016 All rights reserved.
// +-------------------------------------------------------------------
namespace Admin\Controller;

use Kcdns\Admin\Controller\CommonController;

class WarehouseYunOrderController extends CommonController
{
    public function edit()
    {
    if (IS_POST) {	
			try {
				OE('yun')->deliver(I('get.warehouse_yun_order.id'),I('post.'));
				$this->success('操作成功');
			} catch (\Exception $e) {
				$this->error($e->getMessage());
			}
		} else {
			$result = M('warehouse_yun_order')->where([
					        'id' => I('get.warehouse_yun_order.id'),
					        'status' => 0,
					])->find();
			if (!$result) {
				$this->error('订单已发货，无法操作');
			}
		   parent::edit();
		}
    }
    
    
    
    
}